import request from '@/utils/request'

export function paginate(form, page, page_size) {
  return request({
    url: '/api/pajx/school/paginate',
    method: 'post',
    data: {
      page_num: page,
      page_size: page_size,
      area_code: form.area_code,
      county_code: form.county_code,
      keyword: form.keyword
    }
  })
}

export function detail(scl_id) {
  return request({
    url: '/api/pajx/school/detail',
    method: 'post',
    data: {
      scl_id: scl_id
    }
  })
}

export function update(form) {
  return request({
    url: '/api/pajx/school/update',
    method: 'post',
    data: {
      scl_id: form.scl_id,
      scl_name: form.scl_name,
      category: form.category,
      scl_type: form.scl_type,
      scl_product_id: form.scl_product_id,
      ecid: form.ecid,
      biz_status_flag: form.biz_status_flag, 
      default_biz_type: form.default_biz_type,
      marketing_type_flag: form.marketing_type_flag,
      card_type_flag: form.card_type_flag,
      card_issuer_flag: form.card_issuer_flag,
      share_equ_att_flag: form.share_equ_att_flag,
      share_equ_tel_flag: form.share_equ_tel_flag,
      limit_telarea_flag: form.limit_telarea_flag,
      limit_telcom_flag: form.limit_telcom_flag,
      tel_stu_callany_flag: form.tel_stu_callany_flag,
      tel_stu_nccall_flag: form.tel_stu_nccall_flag,
      face_push_ratio: form.face_push_ratio,
      msg_push_type: form.msg_push_type,
      tel_equ_share_id: form.tel_equ_share_id,
      biz_way: form.biz_way
    }
  })
}

export function cmcc(form) {
  return request({
    url: '/api/sys/user/cmcc/look',
    method: 'post',
    data: { 
      keyword: form.keyword
    }
  })
}

export function divide(form) {
  return request({
    url: '/api/sys/user/cmcc/divide',
    method: 'post',
    data: { 
      scl_id: form.scl_id,
      user_id: form.user_id
    }
  })
}

export function sync() {
  return request({
    url: '/api/pajx/school/sync',
    method: 'post',
    data: { }
  })
}